<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <!-- 双向数据绑定:v-mpdel  问你
        数据流向：data<==>template
     -->


    <div id="test">
        <input type="text" v-model="msg">
        <p>Hello {{msg}}</p>
    </div>
        <p id="test2">{{msg}}</p>
    <script src="./js/vue.js"></script>
    <script>
        const vue=new Vue({//配置对象
            el:'#test',
            data:{//包含数据对象
                 msg:'zyy'
            }
        })
        setTimeout(()=>{
            vue.msg='haha'
        },1000)
        new Vue({
            data:{
                msg:'tom'
            }
        }).$mount('#test2')
    </script>
</body>
</html>